import { tabBarPage } from '../layout'
const routes = [
  {
    path: '/',
    component: tabBarPage,
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'home',
        redirect: '/homepage',
        component: () => import('@/view/home'),
        children: [
          // 首页
          {
            path: '/homepage',
            name: 'homepage',
            component: () => import('@/view/home/homepage/vanlist-chunk')
          },
          // 合集
          {
            path: '/compilations',
            name: 'compilations',
            component: () => import('@/view/compilations')
          },
          // 精选
          {
            path: '/choiceness',
            name: 'choiceness',
            component: () => import('@/view/choiceness')
          },
          // 小视频
          {
            path: '/small-video',
            name: 'smallVideo',
            component: () => import('@/view/small-video')
          },
          // 影视
          {
            path: '/film-and-television',
            name: 'filmsAndTelevision',
            component: () => import('@/view/films-and-television')
          }
        ]
      },
      {
        path: '/dynamic',
        name: 'dynamic',
        component: () => import('@/view/dynamic'),
        redirect: '/dynamic/concern',
        children: [
          // 关注
          {
            path: '/dynamic/concern',
            name: 'concern',
            component: () => import('@/view/dynamic/concern')
          },
          // 推荐
          {
            path: '/dynamic/recommend',
            name: 'recommend',
            component: () => import('@/view/dynamic/recommend')
          },
          // 同城
          {
            path: '/dynamic/sameCity',
            name: 'sameCity',
            component: () => import('@/view/dynamic/sameCity')
          }
        ]
      },
      //动态详情
      {
        path: '/dynamic_detail',
        name: 'dynamicDetail',
        component: () => import('@/view/dynamic/dynamicDetail')
      },
      //热门话题详情
      {
        path: '/hot_topic_detail',
        name: 'hotTopicDetail',
        component: () => import('@/view/dynamic/hotTopicDetail')
      },
      // 信息
      {
        path: '/message',
        name: 'message',
        redirect: '/message/home',
        component: () => import('@/view/message'),
        children: [
          {
            path: '/message/home',
            name: 'message_home',
            component: () => import('@/view/message/home')
          },
          // @我的页面
          {
            path: '/message/ait_me',
            name: 'ait_me',
            component: () => import('@/view/message/aitMe')
          }
        ]
      },
      // 全局搜索
      {
        path: '/search',
        name: 'search',
        redirect: '/overallSearch',
        component: () => import('@/view/search'),
        children: [
          // 全局搜索页面
          {
            path: '/overallSearch',
            name: 'overallSearch',
            component: () => import('@/view/search/search-page/overallSearch')
          },
          // 搜索后的页面
          {
            path: '/searchFollow',
            name: 'searchFollow',
            redirect: '/synthesizeSearchPage',
            component: () => import('@/view/search/tabs-page/searchFollow'),
            children: [
              {
                path: '/synthesizeSearchPage',
                name: 'synthesizeSearchPage',
                component: () => import('@/view/search/content-page/synthesizeTab')
              },
              {
                path: '/videoSearchPage',
                name: 'videoSearchPage',
                component: () => import('@/view/search/content-page/videoTab')
              },
              {
                path: '/userSearchPage',
                name: 'userSearchPage',
                component: () => import('@/view/search/content-page/userTab')
              },
              {
                path: '/topicSearchPage',
                name: 'topicSearchPage',
                component: () => import('@/view/search/content-page/topicTab')
              }
            ]
          }
        ]
      },
      // 频道
      {
        path: '/channel',
        name: 'channel',
        component: () => import('@/view/channel')
      },
      // 游戏
      {
        path: '/allChannels',
        name: 'allChannels',
        component: () => import('@/view/channel/channelPage/all-channels')
      },
      // 即将到来
      {
        path: '/upcoming',
        name: 'upcoming',
        component: () => import('@/view/upcoming')
      }

      // {
      //   path: '/home-search',
      //   name: 'homeSearch',
      //   component: () => import('@/view/home/home-search')
      // },
    ]
  },
  {
    path: '/detail-up',
    name: 'DetailUp',
    component: () => import('@/view/home/detail-up')
  },
  {
    path: '/detail-album',
    name: 'DetailAlbum',
    component: () => import('@/view/home/detail-album')
  },
  {
    path: '/detail-small-video',
    name: 'DetailSmallVideo',
    component: () => import('@/view/home/detail-small-video/index')
  },
  {
    path: '/detail-topic',
    name: 'DetailTopic',
    component: () => import('@/view/home/detail-topic')
  },
  {
    path: '/home_classify',
    name: 'classify',
    component: () => import('@/view/classify')
  }
]

export default routes
